< Prev(J) / Next(K) > / View :

Filename: /text/sbasic/guide/show_dialog.xhp

(bookmark: bm_id3154140)
module/dialog toggle
dialogs;using program code to show (example)
examples; showing a dialog using program code

モジュールとダイアログの切り替え
ダイアログ;表示にプログラムコードを使用する (例)
例; プログラムコードを使ってダイアログを表示する

(variable: show_dialog)Opening a Dialog With Program Code
(variable: show_dialog)ダイアログ表示用のプログラムコード(hd_id3154140.1)

In the Office BASIC window for a dialog that you created, leave the dialog editor by clicking the name tab of the Module that the dialog is assigned to. The name tab is at the bottom of the window.
ダイアログを作成した Office BASIC ウィンドウで、ダイアログを割り当てるモジュール名のタブをクリックして、エディタ画面を切り換えます。モジュール名のタブは、画面の下側に表示されています。(par_id3145171.2)

Enter the following code for a subroutine called Dialog1Show. In this example, the name of the dialog that you created is "Dialog1":
下記の Dialog1Show サブルーチンのコードを入力します。なおこの例では、ユーザー定義したダイアログ名を「Dialog1」としています。(par_id3153968.6)

Sub Dialog1Show
Sub Dialog1Show(par_id3156443.7)

BasicLibraries.LoadLibrary("Tools")
BasicLibraries.LoadLibrary("Tools")(par_id3148575.24)

oDialog1 = LoadDialog("Standard", "Dialog1")
oDialog1 = LoadDialog("Standard", "Dialog1")(par_id3152463.8)

oDialog1.Execute()
oDialog1.Execute()(par_id3148646.14)

End Sub
End Sub(par_id3147349.15)

Without using "LoadDialog" you can call the code as follows:
「LoadDialog」を使用しなくても、下記のコードのようにしてダイアログを呼び出すことができます。(par_id3152596.18)

Sub Dialog1Show
Sub Dialog1Show(par_id3163710.19)

DialogLibraries.LoadLibrary( "Standard" )
DialogLibraries.LoadLibrary( "Standard" )(par_id3146985.20)

oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )
oDialog1 = CreateUnoDialog( DialogLibraries.Standard.Dialog1 )(par_id3155418.21)

oDialog1.Execute()
oDialog1.Execute()(par_id3154944.22)

End Sub
End Sub(par_id3145800.23)

When you execute this code, "Dialog1" opens. To close the dialog, click the close button (x) on its title bar.
このコードを実行すると「Dialog1」が開きます。ダイアログを閉じるには、タイトルバーにある閉じるボタン (×) をクリックします。(par_id3153157.16)

(embed text/sbasic/guide/create_dialog.xhp#create_dialog : linkinfo)

Creating a Basic Dialog
Basic ダイアログの作成(hd_id3149346.1)

(/embed text/sbasic/guide/create_dialog.xhp#create_dialog)


< Prev / Next >